home *** CD-ROM | disk | FTP | other *** search
/ Enigma Amiga Life 110 / EnigmaAmiga110CD.iso / kit internet / stack tcp-ip / genesis104_demo / genesis / bin / startnet < prev    next >
AmigaDOS Script File  |  1998-02-17  |  2KB  |  85 lines

  1. .key DEBUG/S,PROVIDER/K,SCRIPT/K,NOSRV/S,BOOTPOPTIONS/F
  2. .bra {
  3. .ket }
  4. ;
  5. ; use profile made by AmiTCP Prefs by default
  6. .def PROVIDER "ENV:NetConfig/Provider.conf"
  7. ; the default dial script
  8. .def SCRIPT "AmiTCP:db/Dialscript"
  9. ;
  10. ; AmiTCP/IP DialUp 4.5 NetConnect version startnet script
  11. ;
  12. ; Copyright © 1996 AmiTCP/IP Group,
  13. ;                  NSDi - Network Solutions Development Inc., Finland
  14. ;                  All rights reserved.
  15. ;
  16. ; *NOTE*  YOU SHOULD NOT NEED TO EDIT ANYTHING BELOW. IF YOU NEED TO START
  17. ; *NOTE*  UTILITIES, DO IT IN THE ENV:NetConfig/User-Startnet.
  18. ; *NOTE*  YOU CAN STOP THESE UTILITIES IN ENV:NetConfig/User-Stopnet.
  19. ;
  20. ; Set the failat level so that the errors can be handled by the script
  21. FailAt 21
  22.  
  23. If NOT Exists {PROVIDER}
  24.   Echo AmiTCP/IP is not configured
  25.   Echo Starting the configuration tool...
  26.   Run >nil: <nil: NetConnect:AmiTCPPrefs
  27.   Quit 20
  28. EndIf
  29.  
  30. Version bsdsocket.library >nil:
  31. If Warn
  32.   If X EQ "X{DEBUG}"
  33.     Run >nil: <nil: AmiTCP:bin/AmiTCP.kernel {DEBUG}
  34.   Else
  35.     Run AmiTCP:AmiTCP {DEBUG}
  36.   EndIf
  37. EndIf
  38.  
  39. AmiTCP:bin/WaitForPort AMITCP
  40. If NOT Warn
  41.   ; Log in with the default user name (nobody)
  42.   AmiTCP:bin/login -f dolphin
  43.   ; Configure AmiTCP
  44.   AmiTCP:bin/bootpconfig PROVIDERFILE={PROVIDER} DIALSCRIPT={SCRIPT} {DEBUG} {BOOTPOPTIONS}
  45.   If NOT Warn
  46.     ;
  47.     ; Mount TCP:
  48.     ;
  49.     Assign TCP: Exists >NIL:
  50.     IF Warn
  51.       Mount TCP: from AmiTCP:devs/Inet-Mountlist
  52.     EndIf
  53.     ;
  54.     ; Start inetd if needed
  55.     ;
  56.     If X EQ "X{NOSRV}"
  57.       If X EQ "X{DEBUG}"
  58.         Run <NIL: >NIL: AmiTCP:bin/inetd
  59.       Else
  60.         Run AmiTCP:bin/inetd {DEBUG}
  61.       EndIf
  62.     EndIf
  63.     ;
  64.     ; Start utilities in ENV:NetConfig/User-Startnet
  65.     ;
  66.     If Exists ENV:NetConfig/User-Startnet
  67.       Execute ENV:NetConfig/User-Startnet
  68.     EndIf
  69.     ;
  70.     ; Successfull end
  71.     ;
  72.     Echo AmiTCP/IP DialUp 4.5 is now on-line. Your host name is $HOSTNAME.
  73.   Else
  74.     Echo AmiTCP/IP DialUp configuration failed!
  75.   EndIf
  76. Else
  77.   Echo AmiTCP/IP DialUp couldn't be started!
  78. EndIf
  79.  
  80. ; Ask NetConnect to reload the interface
  81. ; (and change the state of the start/stop button
  82. Rx >Nil: "address NETCONNECT; refresh"
  83.  
  84. ; EOF
  85.